﻿var questionsFrequently = {
    init: function(){
        trace('questionsFrequently : init');
        
        $('dl.tabs > dt').bind('click', questionsFrequently.ClickMn);
        $('dl.tabs dd dl > dt').bind('click', questionsFrequently.clickInternal);
        
        $('dl.tabs > dt').eq(0).trigger('click');
    },
    
    ClickMn: function(e){
        var _this = $(e.currentTarget);
        
        $('dl.tabs dt').removeClass('on');
        _this.addClass('on');
        
        _this.siblings('dd').hide().find('dd').hide();
        _this.next('dd').show().find('dt').eq(0).trigger('click');
    },
    
    clickInternal: function(e){
        var _this = $(e.currentTarget);
        
        $('dl.tabs dd dl > dd').slideUp();
        _this.next('dd').slideToggle();
    }
};

$(document).ready(questionsFrequently.init);